package com.xxc.exam

import com.xxc.common.util.ExcelUtil
import com.xxc.common.util.POIUtil
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.data.redis.core.RedisTemplate
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
import java.io.File
import java.io.FileInputStream
import java.sql.Time
import java.text.SimpleDateFormat

//@RunWith(SpringJUnit4ClassRunner::class)
//@SpringBootTest
class ExamProApplicationTests {

    @Autowired
    lateinit var redisTemplate: RedisTemplate<String,String>

    @Test
    fun hello() {
        val value = "01:00"
        val format = SimpleDateFormat("HH:mm")
        println(Time(format.parse(value).time))
//        redisTemplate.opsForValue().set("name","xxc")
//        println(redisTemplate.opsForValue().get("name"))
    }

    @Test
    fun test1(){
        val sb = StringBuilder()
        sb.append("xxc,")
        println(if (sb.isNotEmpty())
            sb.deleteCharAt(sb.length - 1).toString()
        else
            sb.toString())
    }

}
